package com.design.strategy.demo.objectadapter;



public class PowerAdatper implements DC5 {

    private  AC220 ac220;

    public PowerAdatper(AC220 ac220) {
        this.ac220 = ac220;
    }

    @Override
    public int output5V() {
        int adapterInput = ac220.outputAC220V();
        int adapterOut = adapterInput / 44;
        System.out.println("使用Adapter输出AC" + adapterInput + "V,输出DC" + adapterOut + "V");

        return adapterOut;
    }
}
